Icon themes can be created by extensions and thus are likely destroyed on
extension unload, so we must disconnect from StSettings signals to avoid
accessing to invalid memory.
See: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/
2012021
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2711>
icon_theme->pixbuf_supports_svg = pixbuf_supports_svg ();
settings = st_settings_get ();
- g_signal_connect (settings, "notify::gtk-icon-theme",
- G_CALLBACK (theme_changed), icon_theme);
+ g_signal_connect_object (settings, "notify::gtk-icon-theme",
+ G_CALLBACK (theme_changed), icon_theme, 0);
update_current_theme (icon_theme);
}